python program count number of digits